﻿using Domain.Entity;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EfCore.Configers
{
    public class EEConfigers : IEntityTypeConfiguration<EE>
    {
        public void Configure(EntityTypeBuilder<EE> builder)
        {
            builder.ToTable("EE"); // 设置表名
            builder.HasKey(e => e.ExaId); // 设置主键
            builder.Property(e => e.ExaId).HasColumnName("ExaId").ValueGeneratedOnAdd(); // 设置自增列
            builder.Property(e => e.ExamNumber).HasColumnName("ExamNumber"); // 设置试卷编号列
            builder.Property(e => e.MajorKindId).HasColumnName("MajorKindId"); // 设置职位分类编号列
            builder.Property(e => e.MajorKindName).HasColumnName("MajorKindName"); // 设置职位分类名称列
            builder.Property(e => e.MajorId).HasColumnName("MajorId"); // 设置职位编号列
            builder.Property(e => e.MajorName).HasColumnName("MajorName"); // 设置职位名称列
            builder.Property(e => e.Register).HasColumnName("Register"); // 设置登记人列
            builder.Property(e => e.RegistTime).HasColumnName("RegistTime"); // 设置登记时间列
            builder.Property(e => e.LimiteTime).HasColumnName("LimiteTime"); // 设置答题限时列
                                                                             // 设置其他属性的配置...
        }
    }
}
